﻿using System;
using System.Collections.Generic;
using System.Text;

namespace SAM.Framework.Security
{
    public interface ISecurity
    {
        /// <summary>
        /// 对文本进行md5加密
        /// </summary>
        /// <param name="str">需要md5加密的字符串</param>
        /// <returns></returns>
        string SecurityTextForMd5(string str);

        /// <summary>
        /// 对字符串进行加密
        /// </summary>
        /// <param name="encryptString">需要加密的字符串</param>
        /// <param name="entryptKey">加密密钥，要求8位</param>
        /// <returns></returns>
        string Escape(string encryptString, string entryptKey);

        /// <summary>
        /// 对字符串进行解密
        /// </summary>
        /// <param name="encryptString">需要解密的字符串</param>
        /// <param name="entryptKey">解密密钥，要求8位，和密码密钥一致</param>
        /// <returns></returns>
        string Unescape(string encryptString, string entryptKey);
    }
}
